﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MaterAlbum.aspx.cs" Inherits="MaterAlbum" Title="Untitled Page" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <div class="demoheading" style="width:400px">Manter Álbum</div>   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
            
    <div style="width:400">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>
   
         <asp:Panel ID="Panel2" runat="server" CssClass="collapsePanelHeader" Height="20px" Width="400px">
               <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
               <div style="float: left;">Consultar Álbum</div>
               </div>
         </asp:Panel>
        
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataSourceID="odsAlbum" Width="400px">
                    <Columns>
                        <asp:BoundField DataField="Cod" HeaderText="Cod" SortExpression="Cod" />
                        <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                        <asp:BoundField DataField="CodAno" HeaderText="CodAno" 
                            SortExpression="CodAno" />
                        <asp:BoundField DataField="Usuario" HeaderText="Usuario" 
                            SortExpression="Usuario" />
                        <asp:TemplateField HeaderText="Atualiza/Remove">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbAtualiza" runat="server" onclick="lbAtualiza_Click">Atualiza</asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="lbRemove" runat="server" onclick="lbRemove_Click">Remove</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
        
    
        
    
    <asp:ObjectDataSource ID="odsAlbum" runat="server" 
        DataObjectTypeName="Negocios.Album" DeleteMethod="Excluir" 
        InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
        SelectMethod="ConsultaTodos" TypeName="Negocios.AlbumBLL">
    </asp:ObjectDataSource>
    
    <br />
    <asp:Panel ID="Panel1" runat="server" CssClass="collapsePanelHeader" Height="20px" Width="400px">
        <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
        <div style="float: left;"></div>
        </div>
    </asp:Panel>
    
                <table style="width:401px" class="divDados">
                    <tr bgcolor="White" class="divOID">
                        <td style="width: 99px; height: 32px">
                            <asp:Label ID="Label1" runat="server" Text="Código:" Font-Bold="True" 
                                ForeColor="White"></asp:Label>
                        </td>
                        <td style="height: 32px">
                            <asp:TextBox ID="txtCod" runat="server" Enabled="False"></asp:TextBox>
                            &nbsp;&nbsp;
                            <asp:Button ID="btnNovo" runat="server" onclick="Button1_Click" 
                                Text="Novo Álbum" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 99px">
                            <asp:Label ID="Label2" runat="server" Text="Nome do Álbum:"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtNomeAlbum" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 99px">
                            <asp:Label ID="Label3" runat="server" Text="Ano:"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlAno" runat="server" Enabled="False" Width="70px">
                                <asp:ListItem Selected="True" Value="0">Ano</asp:ListItem>
                                <asp:ListItem>1991</asp:ListItem>
                                <asp:ListItem>1992</asp:ListItem>
                                <asp:ListItem>1993</asp:ListItem>
                                <asp:ListItem>1994</asp:ListItem>
                                <asp:ListItem>1994</asp:ListItem>
                                <asp:ListItem>1995</asp:ListItem>
                                <asp:ListItem>1996</asp:ListItem>
                                <asp:ListItem>1997</asp:ListItem>
                                <asp:ListItem>1998</asp:ListItem>
                                <asp:ListItem>1999</asp:ListItem>
                                <asp:ListItem>2000</asp:ListItem>
                                <asp:ListItem>2001</asp:ListItem>
                                <asp:ListItem>2002</asp:ListItem>
                                <asp:ListItem>2003</asp:ListItem>
                                <asp:ListItem>2004</asp:ListItem>
                                <asp:ListItem>2005</asp:ListItem>
                                <asp:ListItem>2006</asp:ListItem>
                                <asp:ListItem>2007</asp:ListItem>
                                <asp:ListItem>2008</asp:ListItem>
                                <asp:ListItem Value="2009">2009</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 99px">
                            <asp:Label ID="Label4" runat="server" Text="Usuário:"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtUsuario" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Button ID="btnGrava" runat="server" Enabled="False" 
                                onclick="btnGrava_Click" Text="Gravar" />
                            <cc1:ConfirmButtonExtender ID="btnGrava_ConfirmButtonExtender" runat="server" 
                                ConfirmText="Deseja Gravar?" Enabled="True" TargetControlID="btnGrava">
                            </cc1:ConfirmButtonExtender>
                            &nbsp;&nbsp;
                            <asp:Button ID="btnCancelar" runat="server" Enabled="False" 
                                onclick="btnCancelar_Click" Text="Cancelar" />
                        </td>
                    </tr>
                </table>
        
    
        
            <br />
         <asp:Label ID="lblerro" runat="server" CssClass="erro"></asp:Label>
        
    
        
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>

</asp:Content>

   
